<template>
  <div class="lb">
    <swiper class="swiper" :options="swiperOption">
      <swiper-slide><img src="../assets/xch-img/1.jpeg" /></swiper-slide>
      <swiper-slide><img src="../assets/xch-img/2.jpeg" /></swiper-slide>
      <swiper-slide><img src="../assets/xch-img/3.jpeg" /></swiper-slide>
      <swiper-slide><img src="../assets/xch-img/4.jpeg" /></swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
      <div class="swiper-button-prev" slot="button-prev"></div>
      <div class="swiper-button-next" slot="button-next"></div>
    </swiper>
  </div>
</template>

<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.css";

export default {
  name: "swiper-example-loop",
  title: "Loop mode / Infinite loop",
  components: {
    Swiper,
    SwiperSlide,
  },
  data() {
    return {
      swiperOption: {
        slidesPerView: 1,
        spaceBetween: 30,
        loop: true,
        autoplay: {
          delay: 2000
        },
        pagination: {
          el: ".swiper-pagination",
          clickable: true,
        },
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      },
    };
  },
};
</script>

<style lang="scss" scoped>
.lb {
  width: 1200px;
  height: 600px;
  padding: 50px 0 0 0;
  margin: 0 auto;
}

.swiper img {
  object-fit: cover;
  width: 1200px;
  height: 500px;
}
</style>
